package com.ysstech.valuation.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.time.LocalDate;

import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 估值估值信息表
 * </p>
 *
 * @author lishuangliang
 * @since 2021-05-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("val_valuation")
public class Valuation extends Model<Valuation> {

    private static final long serialVersionUID = 1L;

    @TableId("ID")
    private String id;

    /**
     * 基金编号
     */
    @TableField("ACCOUNT_ID")
    private String accountId;

    /**
     * 科目编码
     */
    @TableField("SUBJECT_ID")
    private String subjectId;

    /**
     * 日期
     */
    @TableField("FDATE")
    private LocalDate fdate;
    /**
     * 数量
     */
    @TableField("AMOUNT")
    private BigDecimal amount;

    /**
     * 成本
     */
    @TableField("COST")
    private BigDecimal cost;

    /**
     * 市值
     */
    @TableField("MARKET_VALUE")
    private BigDecimal marketValue;

    /**
     * 停牌信息
     */
    @TableField("SUSPENDED_INFO")
    private String suspendedInfo;
    /**
     * 权益信息
     */
    @TableField("RIGHT_INFO")
    private String rightInfo;

    /**
     * 状态
     */
    @TableField("STATUS")
    private Integer status;


    /**
     * 添加时间
     */
    @TableField("ADD_TIME")
    private LocalDateTime addTime;

    /**
     * 添加用户
     */
    @TableField("ADD_USER")
    private String addUser;

    /**
     * 修改时间
     */
    @TableField("EDIT_TIME")
    private LocalDateTime editTime;

    /**
     * 修改用户
     */
    @TableField("EDIT_USER")
    private String editUser;
    /**
     * 删除原因
     */
    @TableField("DELETE_REASON")
    private String deleteReason;

    @Override
    protected Serializable pkVal() {
        return null;
    }

    /**
     * 单位成本
     */
    @TableField(exist = false)
    private BigDecimal unitCost;
    /**
     * 估值增值
     */
    @TableField(exist = false)
    private BigDecimal valuationAppreciation;

    /**
     * 成本占净值比
     */
    @TableField(exist = false)
    private BigDecimal costRate;

    /**
     * 市值占净值比
     */
    @TableField(exist = false)
    private BigDecimal marketValueRate;
    //开始日期
    @TableField(exist = false)
    private String startDate;
    //结束日期
    @TableField(exist = false)
    private String endDate;

    //查询条件
    @TableField(exist = false)
    private String selfdate;
    //科目代码
    @TableField(exist = false)
    private String subjectCode;
    //科目名称
    @TableField(exist = false)
    private String subjectName;
    /**
     * 资产分类 1资产类 2负债类 3共同类 4 权益类 6损益类
     */
    @TableField(exist = false)
    private Integer assetsType;


    /**
     * 表格树字段
     */
    @TableField(exist = false)
    private Integer detailed; //是否明细科目
    @TableField(exist = false)
    private String parentId; // 父级节点id
    @TableField(exist = false)
    private String _parentId; // 父级节点id
    @TableField(exist = false)
    private String state;  //状态，默认 open 可以closed
    @TableField(exist = false)
    private String iconCls; //图标
    @TableField(exist = false)
    private boolean checked; //是否选中

}
